package com.star.uc.infras.repository.model;

import com.star.common.core.contract.BaseRepository;
import com.star.common.core.contract.Model;
import com.star.uc.infras.repository.service.UserOuterMapperInfoRepository;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

/**
 * 第三方登录映射用户信息(UserOuterMapperInfo)表实体类
 *
 * @author 周恒哲
 * @since 2023-10-18 14:21:52
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class UserOuterMapperInfoBO extends Model {
    /**
     * 主键ID（雪花算法）
     */
    @Schema(description = "主键ID")
    private String id;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 创建人编码
     */
    @Schema(description = "创建人编码")
    private String createBy;

    /**
     * 创建人编码
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建人编码
     */
    @Schema(description = "更新人编码")
    private String updateBy;

    /**
     * 创建人编码
     */
    @Schema(description = "更新人")
    private String updater;
    /**
     * 租户ID
     */
    @Schema(description = "租户ID")
    private String tenantId;
    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private String uid;
    /**
     * 登录类型
     * @see com.star.uc.contract.enums.LoginTypeEnum
     */
    @Schema(description = "登录类型")
    private String loginType;
    /**
     * 第三方登录ID,手机号，邮箱等
     */
    @Schema(description = "第三方登录ID")
    private String identifier;
    /**
     * 国家区号
     */
    @Schema(description = "国家区号")
    private String countryCode;

    /**
     * 密码， (自建账号的保存密码)
     */
    @Schema(description = "密码")
    private String credential;

    /**
     * 加盐
     */
    @Schema(description = "加盐")
    private String salt;

    public static UserOuterMapperInfoRepository repository() {
        return BaseRepository.of(UserOuterMapperInfoBO.class);
    }
}

